//
//  FMPlayerView.h
//  NewMyMusicAPP
//
//  Created by 11_wyq on 15/6/21.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "FMPlayerModel.h"
#import "UIColor+info.h"
#import "UIImageView+WebCache.h"
#import "SDImageCache.h"
#import "AudioStreamer.h"
#import <STKAudioPlayer.h>
#import <MediaPlayer/MediaPlayer.h>
@protocol changeMusic <NSObject>




-(void)NextMusic;
-(void)lastSong;
-(void)collection:(BOOL)result;
-(void)drop:(BOOL)result;
-(void)background:(UIImage *)image;



@end









@interface FMPlayerView : UIView<UIWebViewDelegate>

@property (retain ,nonatomic)STKAudioPlayer *audioPlayer;

@property(nonatomic,copy)NSString *myID;

@property(nonatomic,copy)NSString *title;



@property(nonatomic,retain)FMPlayerModel *model;
@property(nonatomic,retain)UIScrollView *scrollView;
@property(nonatomic,retain)UIImageView *MyImageView;//背景图片
@property(nonatomic,retain)UIImageView *image;

@property(nonatomic,retain)UILabel *richIntro;//简介
@property(nonatomic,retain)UILabel *tagsTitle;//标签标题
@property(nonatomic,retain)UILabel *tags;//标签
@property(nonatomic,retain)UILabel *lyric;//歌词内容

@property(nonatomic,retain)UILabel *lyricLabel;//歌词:

@property(nonatomic,retain)UIButton *button;//播放按钮
@property(nonatomic,retain)UIButton *likeButton;//收藏按钮


@property(nonatomic,assign)BOOL isPlaying;//判断是否播放
@property(nonatomic,assign)BOOL isRotating;//判断是否旋转
@property(nonatomic,assign)BOOL isCollection;//判断是否收藏


@property (retain ,nonatomic) AudioStreamer *streamer;
@property(nonatomic,retain)NSMutableArray *Audio;//音频懒加载
@property (assign ,nonatomic) NSInteger index;//计数器
@property (retain ,nonatomic) NSTimer *playTimer;//计时器
@property(nonatomic,retain)NSIndexPath *indexPath;

@property(nonatomic,retain)NSURL *url;

@property(nonatomic,assign)id<changeMusic>myDelegate;

@property(nonatomic,assign)NSInteger number;
@property (assign ,nonatomic)NSInteger row;





@property(nonatomic,retain)NSMutableArray *array;


-(void)buttonAction;
-(void)spinOn;//开始旋转
-(void)ContinueToRotate;//继续旋转
-(void)suspend;//旋转暂停
-(void)Recovery;


-(instancetype)initWithFrame:(CGRect)frame array:(NSMutableArray *)array;
@end
